package com.xjnt.frameworks.plugin.quartz;

import java.io.Serializable;

import org.quartz.Job;

/**
 * 记录Job信息
 * 
 * @author CAOYONG
 *
 */
public class QJobStore implements Serializable {

	private static final long serialVersionUID = 1L;

	private static final String GROUP_SUFFIX = "_group";

	private String jobName;
	private String jobGroupName;
	private String triggerName;
	private String triggerGroupName;
	private String cronExpression;
	private String description;
	private Class<? extends Job> jobClass;

	
	
	public QJobStore(String jobName, String triggerName, String cronExpression, String description, Class<? extends Job> jobClass) {
		this.jobName = jobName;
		this.jobGroupName = jobName + GROUP_SUFFIX;
		this.triggerName = triggerName;
		this.triggerGroupName = triggerName + GROUP_SUFFIX;
		this.cronExpression = cronExpression;
		this.description = description;
		this.jobClass = jobClass;
	}

	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
		this.jobGroupName = jobName + GROUP_SUFFIX;
	}

	public String getJobGroupName() {
		return jobGroupName;
	}

	public void setJobGroupName(String jobGroupName) {
		this.jobGroupName = jobGroupName;
	}

	public String getTriggerName() {
		return triggerName;
	}

	public void setTriggerName(String triggerName) {
		this.triggerName = triggerName;
		this.triggerGroupName = triggerName + GROUP_SUFFIX;
	}

	public String getTriggerGroupName() {
		return triggerGroupName;
	}

	public void setTriggerGroupName(String triggerGroupName) {
		this.triggerGroupName = triggerGroupName;
	}

	public String getCronExpression() {
		return cronExpression;
	}

	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Class<? extends Job> getJobClass() {
		return jobClass;
	}

	public void setJobClass(Class<? extends Job> jobClass) {
		this.jobClass = jobClass;
	}

}
